#!/bin/bash

. common.sh 

echo X264
cd $SRC
rm -rf x264-snapshot-*
SNAP=x264-snapshot-20110508-2245
curl -O -C - http://downloads.videolan.org/pub/videolan/x264/snapshots/${SNAP}.tar.bz2 && tar xvjf ${SNAP}.tar.bz2
cd $SNAP || exit 2



#curl -O -C - http://downloads.videolan.org/pub/videolan/x264/snapshots/last_stable_x264.tar.bz2

#DIR=`tar xvjf last_stable_x264.tar.bz2 2>&1 | tail -n1 | awk -F'x ' '{print $2}' |  awk -F'/' '{print $1}'`

#cd "$DIR"
./configure --prefix=$PREFIX --enable-shared=no --enable-static=yes  || exit 2
#./configure --prefix=$PREFIX --disable-asm  || exit 2
make   || exit 2
cp libx264.a $PREFIX/lib/

make install  || exit 2


